package com.web.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.web.service.BaseService;
import com.web.service.CategoryService;
import com.web.service.impl.CategoryServiceImpl;

/**
 * Servlet implementation class CategoryServlet
 */
@WebServlet("/category") 
public class CategoryServlet extends BaseService {
	private static final long serialVersionUID = 1L;
       
	public String findAll(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		try {
			// TODO Auto-generated method stub
			response.setContentType("text/html;charset=utf-8");
			CategoryService cs = new CategoryServiceImpl();
			String value = cs.findAll();
			response.getWriter().println(value);
		} catch (Exception e) {
		}
		return null;
	}
}
